package valid_contr
{
	import mx.collections.ArrayCollection;
	import mx.controls.Label;

	public class sf_relationship_label extends Label
	{
		[Bindable] public var _value:String;
		public var dataProvider:ArrayCollection;
		public function sf_relationship_label()
		{
			super();
			
		}
 
         // set for selectedValue 
         public function set value(s:String):void {

			_value = s;
           for (var i:int=0; i<this.dataProvider.length; i++) {
                  // Get this item's data 
                  var item:Object = this.dataProvider[i];
 
                  // Check if is selectedValue 
                  if(item.Id == s) {
                     // Yes, set selectedIndex 
                     this.text = item.Name
                     break;
                  }
               }
         }
		
	}
}